// app.js
App({
  onLaunch() {
    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
    // 获取状态栏
    const {
      statusBarHeight
    } = wx.getSystemInfoSync()
    this.globalData.statusBarHeight = statusBarHeight
  },
  globalData: {
    userInfo: null,
    statusBarHeight: 0
  }
})